-- 用 , 或 Esc 扩展
-- 注意用<esc>后的移动步数是从最后一个扩展后的字符(光标在此字符上)计算的

-- Javascript
-- vim.cmd('iab style style={{}}<esc>1h')
-- vim.cmd('iab onc onClick={}<esc>')
-- vim.cmd('iab fn0 const  = () => {<cr><cr><esc>10h3k10')
-- vim.cmd('iab fn1 var f = function() {<cr><cr><esc>10h3k10')
-- vim.cmd('iab fn2 f : function()  {<cr><cr><esc>10h3k10')
-- vim.cmd('iab fn3 () => {}<esc>')
-- vim.cmd('iab if1 if () {<cr><cr>}<esc>10h3k108l')
-- vim.cmd('iab if2 if () {<cr><cr>} else {<cr><cr>}<esc>10h6k108l')
-- vim.cmd('iab if3 if () {<cr><cr>} else if () {<cr><cr>}<esc>10h6k108l')
-- vim.cmd('iab defs const defaultState = {<cr><cr>}<esc>2ki')
-- vim.cmd('iab defd const defaultData = {<cr><cr>}<esc>2ki')
-- vim.cmd('iab uses const [state,setState] = useSetState(defaultState)<esc>')
-- vim.cmd('iab useref const  = useRef()<esc>10h')
-- vim.cmd('iab usethis const me = useThis()<esc>')
-- vim.cmd('iab usefb const [FeedbackCmp,ajaxIndicator,topMsg,msgDialog] = useFeedback()<esc>')
-- vim.cmd('iab usedf const deferCallback = useDeferCallback() <cr><cr>deferCallback(()=>{<cr>popRef.current.show()})<esc>')
-- vim.cmd('iab maploop {items.map((item)=>(<cr><cr>))}<esc>2ki')
-- vim.cmd('iab forc for (var i = 0; i < rows.length; i++) {<cr>var item = rows[i]<cr>}<esc>1k')
-- vim.cmd('iab fore rows.forEach((row) => {<cr>})<esc>1k')
-- vim.cmd('iab forof for (const p of ps) {<cr>}<esc>1k')
-- vim.cmd('iab sep },{<esc>lC<esc>')
-- vim.cmd('iab cons console.log()<esc>1h')
-- vim.cmd('iab cvt convert : function(v,rec){}<esc>')
-- vim.cmd('iab cvt2 convert : function(vc){}<esc>')
-- vim.cmd('iab methis var me = this<esc>')
-- vim.cmd("iab myid id : me.myId('list'),<esc>")

----- Python
-- --common
-- vim.cmd('iab imptc from apps.utils import common as c<esc>')
-- --ajax
-- vim.cmd('iab imptx from apps.utils import ajax as x<esc>')
-- --log
-- vim.cmd('iab imptl from apps.utils.log import log_exc,log_error,log_event<esc>')
-- --require
-- vim.cmd('iab imptr from apps.utils.require import require_method,require_role,require_login<esc>')
-- --setting
-- vim.cmd('iab impts from django.conf import settings<esc>')
-- --decimal
-- vim.cmd('iab imptd from decimal import Decimal<esc>')
-- --all
-- vim.cmd('iab impt* from . import * # noqa<esc>')
-- vim.cmd('iab loge log_error()<esc>1h')
-- --循环
-- vim.cmd('iab pfor for vd in vds:<esc>')
-- -- post decode
-- vim.cmd('iab p1 ok,r = x.ajax_decode(request)<esc>')
-- vim.cmd('iab p2 if not ok:<esc>')
-- vim.cmd('iab p3     return r<esc>')
-- -- common decorator
-- vim.cmd('iab @l @require_login<esc>')
-- vim.cmd('iab @r @require_role(\'\')<esc>2h')
-- vim.cmd('iab @m @require_method(\'POST\')<esc>5h')
-- vim.cmd('iab @e @log_event(\'\')<esc>2h')
-- -- sql
-- vim.cmd('iab sqli from apps.utils.sql import select_by_raw_sql,exec_by_raw_sql<esc>')
-- vim.cmd('iab sqls rs = select_by_raw_sql(sql)<esc>')
-- vim.cmd('iab sqle ok = exec_by_raw_sql(sql)<esc>')

---- misc
--中文引号
-- vim.cmd('iab yh “”<esc>1h')

--EOP
